package com.dks.controller;

import java.util.HashMap;
import java.util.Map;

import com.dks.repository.IAdvertisingRepository;
import com.dks.result.ResultModel;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("advertising")
@RestController
public class AdvertisingController {

    private IAdvertisingRepository advertisingRepository;

    @Autowired
    public AdvertisingController(final IAdvertisingRepository advertisingRepositoryIn) {
        this.advertisingRepository = advertisingRepositoryIn;
    }

    /**
     * @Author: Ah Nan
     * @Description: 获取首页轮播图
     * @Date: 9:52 2020/4/23
     * @Modificd By:
     * @Param:
     * @return:
     * @throw: 请描述异常信息
     */
    @GetMapping("get-advertising-info")
    public ResultModel<Object> getAdvertisingInfo() {
        Map<String, Object> map = new HashMap<>();
        return advertisingRepository.getAdvertisingInfo(map);
    }



}
